package com.ysq.track.util;

import java.io.Console;
import java.util.Scanner;

/**
 * 控制台输入工具
 */
public class ScannerUtil {
    /** 全局唯一的控制台输入 **/
    private static Scanner scanner = new Scanner(System.in);

    /**
     * 读取console命令
     * @return
     */
    public synchronized static String readInput(){
        String line = scanner.nextLine();
        return line;
    }

    /**
     * 读取密码
     * @return
     */
    public synchronized static String readPassword(){
        String line = scanner.nextLine();
        return line;
    }
}
